/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import djhu.xml.commons.RootElement;
import djhu.xml.commons.XMLObject;

import java.io.Serializable;
import java.sql.Date;
/**
 *
 * @author wudihua
 */
@RootElement(path = "/Bundle")
public class JcbgBean implements Serializable {

    private static final long serialVersionUID = 1L;

    //报告ID
    @XMLObject(xpath = "./id/@value", ntype = XMLObject.ATTRIBUTE)
    private String id;

    //最后更新时间
    @XMLObject(xpath = "./meta/lastUpdated/@value", ntype = XMLObject.ATTRIBUTE)
    private String lastUpdated;

    //文档标识
    @XMLObject(xpath = "./identifier/system/@value", ntype = XMLObject.ATTRIBUTE)
    private String documentAlias;

    //文档标识名称
    @XMLObject(xpath = "./identifier/value/@value", ntype = XMLObject.ATTRIBUTE)
    private String documentAliasName;

    //类型
    @XMLObject(xpath = "./type/@value", ntype = XMLObject.ATTRIBUTE)
    private String type;
    
    //文档ID
    @XMLObject(xpath = "./entry[1]/resource/Composition/id/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionId;

    //文档最后更新时间
    @XMLObject(xpath = "./entry[1]/resource/Composition/meta/lastUpdated/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionLastUpdate;

    //版本号，默认创建为1，执行更新操作，依次增加
    private String versionNumber;

    //文档状态
    @XMLObject(xpath = "./entry[1]/resource/Composition/status/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionStatus;

    //文档类型标识
    @XMLObject(xpath = "./entry[1]/resource/Composition/type/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionTypeAlias;

    //文档类型名称
    @XMLObject(xpath = "./entry[1]/resource/Composition/type/text/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionTypeName;
    
    //关联患者 subject/display
    private String refPatientDisplay;
    
    
    //报告日期 + 时间；2018-05-12T18:12:21Z
    @XMLObject(xpath = "./entry[1]/resource/Composition/date/@value", ntype = XMLObject.ATTRIBUTE)
    private String reportDateTime;

    //报告日期；2018-05-12
    private String reportDate;

    //报告时间；18:12:21
    private String reportTime;

    //文档作者ID
    private String refCompositionAuthor;
    //文档作者
    @XMLObject(xpath = "./entry[1]/resource/Composition/author/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionAuthor;

    //文档标题
    @XMLObject(xpath = "./entry[1]/resource/Composition/title/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionTitle;

    //文档密级
    @XMLObject(xpath = "./entry[1]/resource/Composition/confidentiality/@value", ntype = XMLObject.ATTRIBUTE)
    private String compositionLevel;

    //患者ID
    @XMLObject(xpath = "./entry[2]/resource/Patient/id/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientId;

    //患者是否使用
    private String patientActive;
    //患者姓名
    @XMLObject(xpath = "./entry[2]/resource/Patient/name/text/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientNameAll;

    //患者姓氏
    @XMLObject(xpath = "./entry[2]/resource/Patient/name/family/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientFamilyName;

    //患者名
    @XMLObject(xpath = "./entry[2]/resource/Patient/name/given/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientGivenName;

    //患者电话类型
    @XMLObject(xpath = "./entry[2]/resource/Patient/telecom/system/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientPhoneType;

    //患者电话
    @XMLObject(xpath = "./entry[2]/resource/Patient/telecom/value/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientPhoneNumber;

    //患者电话用途
    @XMLObject(xpath = "./entry[2]/resource/Patient/telecom/use/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientPhoneUse;

    //患者性别；female/male
    @XMLObject(xpath = "./entry[2]/resource/Patient/gender/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientGender;

    //患者出生日期；1955-01-06
    @XMLObject(xpath = "./entry[2]/resource/Patient/birthDate/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientBirthdate;

    //患者地址类型
    @XMLObject(xpath = "./entry[2]/resource/Patient/address/use/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientAddressType;

    //患者地址名称
    @XMLObject(xpath = "./entry[2]/resource/Patient/address/line/@value", ntype = XMLObject.ATTRIBUTE)
    private String patientAddressName;

    
    //关联就就诊
    private String refEcounter;
    //就诊ID; S100
    @XMLObject(xpath = "./entry[3]/resource/Encounter/identifier/value/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterId;

    //就诊状态
    @XMLObject(xpath = "./entry[3]/resource/Encounter/status/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterStatus;

    //就诊类型标识
    @XMLObject(xpath = "./entry[3]/resource/Encounter/class/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterTypeAlias;

    //就诊类型名称
    @XMLObject(xpath = "./entry[3]/resource/Encounter/class/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterTypeName;

    //就诊类型详细名称
    @XMLObject(xpath = "./entry[3]/resource/Encounter/type/text/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterTypeDetail;

    //就诊开始时间 + 日期；2018-05-10T11:30:02Z
    @XMLObject(xpath = "./entry[3]/resource/Encounter/period/start/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterSDateTime;

    //就诊开始日期；2018-05-10
    private String encounterSDate;

    //就诊开始时间；11:30:02
    private String encounterSTime;

    //就诊结束 时间 + 日期；2018-05-18T12:30:02Z
    @XMLObject(xpath = "./entry[3]/resource/Encounter/period/end/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterEDateTime;

    //就诊结束日期；2018-05-18
    private String encounterEDate;

    //就诊结束时间；12:30:02
    private String encounterETime;

    //检查结果ID
    @XMLObject(xpath = "./entry[4]/resource/Observation/id/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationId;

    //检查结果状态
    @XMLObject(xpath = "./entry[4]/resource/Observation/status/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationStatus;

    //检查结果类型标识
    @XMLObject(xpath = "./entry[4]/resource/Observation/category/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationTypeAlias;

    //检查结果类型名称
    @XMLObject(xpath = "./entry[4]/resource/Observation/category/coding/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationTypeName;

    //检查结果项目标识
    @XMLObject(xpath = "./entry[4]/resource/Observation/code/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationItemAlias;

    //检查结果项目名称
    @XMLObject(xpath = "./entry[4]/resource/Observation/code/coding/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationItemName;

   

    //检查时间 + 日期；2018-05-13T09:30:35+01:00
    @XMLObject(xpath = "./entry[4]/resource/Observation/effectiveDateTime/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationDateTime;

    //检查日期；2018-05-13
    private String observationDate;

    //检查时间；09:30:35
    private String observationTime;

    // 更新时间
    private Date  updateTime;

    //检查医生id
    private String observationDoctorId;
    //检查医生
    @XMLObject(xpath = "./entry[4]/resource/Observation/performer/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationDoctor;

    //检查结果
    @XMLObject(xpath = "./entry[4]/resource/Observation/valueString/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationResult;

    //检查部位编码
    private String observationPositionCode;
    //检查部位
    @XMLObject(xpath = "./entry[4]/resource/Observation/bodySite/text/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationPosition;

     //检查方法编码
    private String observationMethodCode;
    //检查方法
    @XMLObject(xpath = "./entry[4]/resource/Observation/method/text/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationMethod;

    //检查设备
    @XMLObject(xpath = "./entry[4]/resource/Observation/device/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String observationEquipment;

    //删除状态，0-未删除，1-已删除
    private String deleteStatus;

    //更新状态，0-未更新，1-已更新
    private String updateStatus;

    
    
    
    
    
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
  
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getLastUpdated() {
        return lastUpdated;
    }

    public void setLastUpdated(String lastUpdated) {
        this.lastUpdated = lastUpdated == null ? null : lastUpdated.trim();
    }

    public String getDocumentAlias() {
        return documentAlias;
    }

    public void setDocumentAlias(String documentAlias) {
        this.documentAlias = documentAlias == null ? null : documentAlias.trim();
    }

    public String getDocumentAliasName() {
        return documentAliasName;
    }

    public void setDocumentAliasName(String documentAliasName) {
        this.documentAliasName = documentAliasName == null ? null : documentAliasName.trim();
    }

    public String getCompositionId() {
        return compositionId;
    }

    public void setCompositionId(String compositionId) {
        this.compositionId = compositionId == null ? null : compositionId.trim();
    }

    public String getCompositionLastUpdate() {
        return compositionLastUpdate;
    }

    public void setCompositionLastUpdate(String compositionLastUpdate) {
        this.compositionLastUpdate = compositionLastUpdate == null ? null : compositionLastUpdate.trim();
    }

    public String getCompositionStatus() {
        return compositionStatus;
    }

    public void setCompositionStatus(String compositionStatus) {
        this.compositionStatus = compositionStatus == null ? null : compositionStatus.trim();
    }

    public String getCompositionTypeAlias() {
        return compositionTypeAlias;
    }

    public void setCompositionTypeAlias(String compositionTypeAlias) {
        this.compositionTypeAlias = compositionTypeAlias == null ? null : compositionTypeAlias.trim();
    }

    public String getCompositionTypeName() {
        return compositionTypeName;
    }

    public void setCompositionTypeName(String compositionTypeName) {
        this.compositionTypeName = compositionTypeName == null ? null : compositionTypeName.trim();
    }

    public String getReportDateTime() {
        return reportDateTime;
    }

    public void setReportDateTime(String reportDateTime) {
        this.reportDateTime = reportDateTime == null ? null : reportDateTime.trim();
    }

    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate == null ? null : reportDate.trim();
    }

    public String getReportTime() {
        return reportTime;
    }

    public void setReportTime(String reportTime) {
        this.reportTime = reportTime == null ? null : reportTime.trim();
    }

    public String getCompositionAuthor() {
        return compositionAuthor;
    }

    public void setCompositionAuthor(String compositionAuthor) {
        this.compositionAuthor = compositionAuthor == null ? null : compositionAuthor.trim();
    }

    public String getCompositionTitle() {
        return compositionTitle;
    }

    public void setCompositionTitle(String compositionTitle) {
        this.compositionTitle = compositionTitle == null ? null : compositionTitle.trim();
    }

    public String getCompositionLevel() {
        return compositionLevel;
    }

    public void setCompositionLevel(String compositionLevel) {
        this.compositionLevel = compositionLevel == null ? null : compositionLevel.trim();
    }

    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId == null ? null : patientId.trim();
    }

    public String getPatientNameAll() {
        return patientNameAll;
    }

    public void setPatientNameAll(String patientNameAll) {
        this.patientNameAll = patientNameAll == null ? null : patientNameAll.trim();
    }

    public String getPatientPhoneType() {
        return patientPhoneType;
    }

    public void setPatientPhoneType(String patientPhoneType) {
        this.patientPhoneType = patientPhoneType == null ? null : patientPhoneType.trim();
    }

    public String getPatientPhoneNumber() {
        return patientPhoneNumber;
    }

    public void setPatientPhoneNumber(String patientPhoneNumber) {
        this.patientPhoneNumber = patientPhoneNumber == null ? null : patientPhoneNumber.trim();
    }

    public String getPatientPhoneUse() {
        return patientPhoneUse;
    }

    public void setPatientPhoneUse(String patientPhoneUse) {
        this.patientPhoneUse = patientPhoneUse == null ? null : patientPhoneUse.trim();
    }

    public String getPatientGender() {
        return patientGender;
    }

    public void setPatientGender(String patientGender) {
        this.patientGender = patientGender == null ? null : patientGender.trim();
    }

    public String getPatientBirthdate() {
        return patientBirthdate;
    }

    public void setPatientBirthdate(String patientBirthdate) {
        this.patientBirthdate = patientBirthdate == null ? null : patientBirthdate.trim();
    }

    public String getPatientAddressType() {
        return patientAddressType;
    }

    public void setPatientAddressType(String patientAddressType) {
        this.patientAddressType = patientAddressType == null ? null : patientAddressType.trim();
    }

    public String getPatientAddressName() {
        return patientAddressName;
    }

    public void setPatientAddressName(String patientAddressName) {
        this.patientAddressName = patientAddressName == null ? null : patientAddressName.trim();
    }

    public String getEncounterId() {
        return encounterId;
    }

    public void setEncounterId(String encounterId) {
        this.encounterId = encounterId == null ? null : encounterId.trim();
    }

    public String getEncounterStatus() {
        return encounterStatus;
    }

    public void setEncounterStatus(String encounterStatus) {
        this.encounterStatus = encounterStatus == null ? null : encounterStatus.trim();
    }

    public String getEncounterTypeAlias() {
        return encounterTypeAlias;
    }

    public void setEncounterTypeAlias(String encounterTypeAlias) {
        this.encounterTypeAlias = encounterTypeAlias == null ? null : encounterTypeAlias.trim();
    }

    public String getEncounterTypeName() {
        return encounterTypeName;
    }

    public void setEncounterTypeName(String encounterTypeName) {
        this.encounterTypeName = encounterTypeName == null ? null : encounterTypeName.trim();
    }

    public String getEncounterTypeDetail() {
        return encounterTypeDetail;
    }

    public void setEncounterTypeDetail(String encounterTypeDetail) {
        this.encounterTypeDetail = encounterTypeDetail == null ? null : encounterTypeDetail.trim();
    }

    public String getEncounterSDateTime() {
        return encounterSDateTime;
    }

    public void setEncounterSDateTime(String encounterSDateTime) {
        this.encounterSDateTime = encounterSDateTime == null ? null : encounterSDateTime.trim();
    }

    public String getEncounterSDate() {
        return encounterSDate;
    }

    public void setEncounterSDate(String encounterSDate) {
        this.encounterSDate = encounterSDate == null ? null : encounterSDate.trim();
    }

    public String getVersionNumber() {
        return versionNumber;
    }

    public void setVersionNumber(String versionNumber) {
        this.versionNumber = versionNumber;
    }

    public String getEncounterSTime() {
        return encounterSTime;
    }

    public void setEncounterSTime(String encounterSTime) {
        this.encounterSTime = encounterSTime == null ? null : encounterSTime.trim();
    }

    public String getEncounterEDateTime() {
        return encounterEDateTime;
    }

    public void setEncounterEDateTime(String encounterEDateTime) {
        this.encounterEDateTime = encounterEDateTime == null ? null : encounterEDateTime.trim();
    }

    public String getEncounterEDate() {
        return encounterEDate;
    }

    public void setEncounterEDate(String encounterEDate) {
        this.encounterEDate = encounterEDate == null ? null : encounterEDate.trim();
    }

    public String getEncounterETime() {
        return encounterETime;
    }

    public void setEncounterETime(String encounterETime) {
        this.encounterETime = encounterETime == null ? null : encounterETime.trim();
    }

    public String getObservationId() {
        return observationId;
    }

    public void setObservationId(String observationId) {
        this.observationId = observationId == null ? null : observationId.trim();
    }

    public String getObservationStatus() {
        return observationStatus;
    }

    public void setObservationStatus(String observationStatus) {
        this.observationStatus = observationStatus == null ? null : observationStatus.trim();
    }

    public String getObservationTypeAlias() {
        return observationTypeAlias;
    }

    public void setObservationTypeAlias(String observationTypeAlias) {
        this.observationTypeAlias = observationTypeAlias == null ? null : observationTypeAlias.trim();
    }

    public String getObservationTypeName() {
        return observationTypeName;
    }

    public void setObservationTypeName(String observationTypeName) {
        this.observationTypeName = observationTypeName == null ? null : observationTypeName.trim();
    }

    public String getObservationItemAlias() {
        return observationItemAlias;
    }

    public void setObservationItemAlias(String observationItemAlias) {
        this.observationItemAlias = observationItemAlias == null ? null : observationItemAlias.trim();
    }

    public String getObservationItemName() {
        return observationItemName;
    }

    public void setObservationItemName(String observationItemName) {
        this.observationItemName = observationItemName == null ? null : observationItemName.trim();
    }

    public String getObservationDateTime() {
        return observationDateTime;
    }

    public void setObservationDateTime(String observationDateTime) {
        this.observationDateTime = observationDateTime == null ? null : observationDateTime.trim();
    }

    public String getObservationDate() {
        return observationDate;
    }

    public void setObservationDate(String observationDate) {
        this.observationDate = observationDate == null ? null : observationDate.trim();
    }

    public String getObservationTime() {
        return observationTime;
    }

    public void setObservationTime(String observationTime) {
        this.observationTime = observationTime == null ? null : observationTime.trim();
    }

    public String getObservationDoctor() {
        return observationDoctor;
    }

    public void setObservationDoctor(String observationDoctor) {
        this.observationDoctor = observationDoctor == null ? null : observationDoctor.trim();
    }

    public String getObservationResult() {
        return observationResult;
    }

    public void setObservationResult(String observationResult) {
        this.observationResult = observationResult == null ? null : observationResult.trim();
    }

    public String getObservationPosition() {
        return observationPosition;
    }

    public void setObservationPosition(String observationPosition) {
        this.observationPosition = observationPosition == null ? null : observationPosition.trim();
    }

    public String getObservationMethod() {
        return observationMethod;
    }

    public void setObservationMethod(String observationMethod) {
        this.observationMethod = observationMethod == null ? null : observationMethod.trim();
    }

    public String getObservationEquipment() {
        return observationEquipment;
    }

    public void setObservationEquipment(String observationEquipment) {
        this.observationEquipment = observationEquipment == null ? null : observationEquipment.trim();
    }

    public String getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(String deleteStatus) {
        this.deleteStatus = deleteStatus == null ? null : deleteStatus.trim();
    }

    public String getUpdateStatus() {
        return updateStatus;
    }

    public void setUpdateStatus(String updateStatus) {
        this.updateStatus = updateStatus == null ? null : updateStatus.trim();
    }

    public String getRefPatientDisplay() {
        return refPatientDisplay;
    }

    public void setRefPatientDisplay(String refPatientDisplay) {
        this.refPatientDisplay = refPatientDisplay;
    }

    public String getRefCompositionAuthor() {
        return refCompositionAuthor;
    }

    public void setRefCompositionAuthor(String refCompositionAuthor) {
        this.refCompositionAuthor = refCompositionAuthor;
    }

    public String getPatientActive() {
        return patientActive;
    }

    public void setPatientActive(String patientActive) {
        this.patientActive = patientActive;
    }

    public String getPatientFamilyName() {
        return patientFamilyName;
    }

    public void setPatientFamilyName(String patientFamilyName) {
        this.patientFamilyName = patientFamilyName;
    }

    public String getPatientGivenName() {
        return patientGivenName;
    }

    public void setPatientGivenName(String patientGivenName) {
        this.patientGivenName = patientGivenName;
    }

    public String getRefEcounter() {
        return refEcounter;
    }

    public void setRefEcounter(String refEcounter) {
        this.refEcounter = refEcounter;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getObservationDoctorId() {
        return observationDoctorId;
    }

    public void setObservationDoctorId(String observationDoctorId) {
        this.observationDoctorId = observationDoctorId;
    }

    public String getObservationPositionCode() {
        return observationPositionCode;
    }

    public void setObservationPositionCode(String observationPositionCode) {
        this.observationPositionCode = observationPositionCode;
    }

    public String getObservationMethodCode() {
        return observationMethodCode;
    }

    public void setObservationMethodCode(String observationMethodCode) {
        this.observationMethodCode = observationMethodCode;
    }


    

    public JcbgBean() {
    }

    public JcbgBean(String id, String lastUpdated) {
        this.id = id;
        this.lastUpdated = lastUpdated;
    }
}